```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JDK中的设计模式应用</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', 'Noto Serif SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background-color: #f8f9fa;
            color: #333;
            line-height: 1.6;
        }
        .hero-bg {
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        }
        .pattern-card {
            transition: all 0.3s ease;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 10px 20px rgba(0,0,0,0.08);
        }
        .pattern-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px rgba(0,0,0,0.12);
        }
        .pattern-icon {
            width: 60px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            margin-bottom: 20px;
        }
        .highlight-box {
            position: relative;
            padding: 1.5rem;
            border-radius: 8px;
            margin: 2rem 0;
        }
        .highlight-box:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            border-radius: 4px 0 0 4px;
        }
        .drop-cap:first-letter {
            float: left;
            font-size: 4rem;
            line-height: 0.8;
            margin: 0.2rem 0.5rem 0 0;
            color: #6e8efb;
            font-weight: bold;
        }
    </style>
</head>
<body class="antialiased">
    <!-- Hero Section -->
    <section class="hero-bg text-white py-20 md:py-32 px-4">
        <div class="container mx-auto max-w-6xl">
            <div class="flex flex-col items-center text-center">
                <h1 class="text-4xl md:text-5xl lg:text-6xl font-bold mb-6 leading-tight">
                    JDK中的设计模式
                </h1>
                <p class="text-xl md:text-2xl max-w-3xl mb-8 opacity-90">
                    探索Java核心类库中隐藏的设计模式架构之美
                </p>
                <div class="w-full max-w-2xl bg-white bg-opacity-20 backdrop-blur-sm rounded-xl p-6">
                    <p class="text-lg md:text-xl drop-cap">
                        设计模式是软件设计中常见问题的典型解决方案。JDK作为Java语言的核心，巧妙地运用了多种经典设计模式来实现其功能。这些模式不仅提高了代码的可维护性和扩展性，更为我们提供了学习设计模式的绝佳范例。
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-6xl px-4 py-16">
        <!-- Introduction -->
        <section class="mb-20">
            <div class="flex flex-col md:flex-row items-center gap-8">
                <div class="md:w-1/2">
                    <h2 class="text-3xl font-bold mb-6 text-gray-800">设计模式在JDK中的应用</h2>
                    <p class="text-lg text-gray-700 mb-6">
                        设计模式是软件开发人员在长期实践中总结出来的经验结晶。JDK作为Java语言的基石，其设计中融入了多种经典的设计模式。理解这些模式在JDK中的应用，不仅能帮助我们更好地使用JDK，还能提升我们的代码设计能力。
                    </p>
                    <p class="text-lg text-gray-700">
                        下面我们将详细介绍JDK中应用的11种主要设计模式，包括它们在JDK中的具体实现实例及其设计思想。
                    </p>
                </div>
                <div class="md:w-1/2">
                    <div class="mermaid">
                        graph TD
                            A[JDK设计模式] --> B[创建型模式]
                            A --> C[结构型模式]
                            A --> D[行为型模式]
                            B --> B1["单例模式 (Runtime)"]
                            B --> B2["工厂方法 (Calendar)"]
                            B --> B3["抽象工厂 (UIManager)"]
                            B --> B4["建造者 (StringBuilder)"]
                            B --> B5["原型模式 (clone())"]
                            C --> C1["装饰者 (IO Streams)"]
                            C --> C2["代理 (Proxy)"]
                            C --> C3["适配器 (Arrays)"]
                            D --> D1["观察者 (Observer)"]
                            D --> D2["策略 (Comparator)"]
                            D --> D3["模板方法 (AbstractList)"]
                    </div>
                </div>
            </div>
        </section>

        <!-- Patterns Grid -->
        <section class="mb-20">
            <h2 class="text-3xl font-bold mb-12 text-center text-gray-800">JDK中的设计模式详解</h2>
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
                <!-- 1. Singleton -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-blue-100 text-blue-600 mx-auto">
                        <i class="fas fa-crown text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">单例模式</h3>
                    <p class="text-gray-600 mb-4">确保一个类只有一个实例，并提供全局访问点。</p>
                    <div class="highlight-box bg-blue-50">
                        <h4 class="font-semibold mb-2 text-blue-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.lang.Runtime</code>: 管理Java运行时环境</li>
                            <li><code class="bg-gray-100 px-1 rounded">java.lang.System</code>: System.out/err/in</li>
                        </ul>
                    </div>
                </div>

                <!-- 2. Factory Method -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-green-100 text-green-600 mx-auto">
                        <i class="fas fa-factory text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">工厂方法</h3>
                    <p class="text-gray-600 mb-4">定义创建对象的接口，让子类决定实例化哪个类。</p>
                    <div class="highlight-box bg-green-50">
                        <h4 class="font-semibold mb-2 text-green-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.util.Calendar</code>: getInstance()</li>
                            <li><code class="bg-gray-100 px-1 rounded">java.util.Locale</code>: getDefault()</li>
                        </ul>
                    </div>
                </div>

                <!-- 3. Abstract Factory -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-purple-100 text-purple-600 mx-auto">
                        <i class="fas fa-industry text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">抽象工厂</h3>
                    <p class="text-gray-600 mb-4">提供接口创建一系列相关对象，无需指定具体类。</p>
                    <div class="highlight-box bg-purple-50">
                        <h4 class="font-semibold mb-2 text-purple-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">javax.swing.UIManager</code>: Look and Feel</li>
                        </ul>
                    </div>
                </div>

                <!-- 4. Builder -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-yellow-100 text-yellow-600 mx-auto">
                        <i class="fas fa-hammer text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">建造者模式</h3>
                    <p class="text-gray-600 mb-4">将复杂对象的构建与其表示分离。</p>
                    <div class="highlight-box bg-yellow-50">
                        <h4 class="font-semibold mb-2 text-yellow-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.lang.StringBuilder</code></li>
                            <li><code class="bg-gray-100 px-1 rounded">java.util.stream.Stream</code></li>
                        </ul>
                    </div>
                </div>

                <!-- 5. Prototype -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-red-100 text-red-600 mx-auto">
                        <i class="fas fa-clone text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">原型模式</h3>
                    <p class="text-gray-600 mb-4">通过复制现有对象来生成新实例。</p>
                    <div class="highlight-box bg-red-50">
                        <h4 class="font-semibold mb-2 text-red-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.lang.Object.clone()</code></li>
                        </ul>
                    </div>
                </div>

                <!-- 6. Decorator -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-indigo-100 text-indigo-600 mx-auto">
                        <i class="fas fa-paint-roller text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">装饰者模式</h3>
                    <p class="text-gray-600 mb-4">动态地给对象添加额外的职责。</p>
                    <div class="highlight-box bg-indigo-50">
                        <h4 class="font-semibold mb-2 text-indigo-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.io</code>包中的流类</li>
                            <li><code class="bg-gray-100 px-1 rounded">BufferedReader</code>, <code class="bg-gray-100 px-1 rounded">PrintWriter</code></li>
                        </ul>
                    </div>
                </div>

                <!-- 7. Proxy -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-teal-100 text-teal-600 mx-auto">
                        <i class="fas fa-user-secret text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">代理模式</h3>
                    <p class="text-gray-600 mb-4">为其他对象提供代理以控制访问。</p>
                    <div class="highlight-box bg-teal-50">
                        <h4 class="font-semibold mb-2 text-teal-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.lang.reflect.Proxy</code></li>
                            <li><code class="bg-gray-100 px-1 rounded">java.rmi.Naming</code></li>
                        </ul>
                    </div>
                </div>

                <!-- 8. Observer -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-pink-100 text-pink-600 mx-auto">
                        <i class="fas fa-eye text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">观察者模式</h3>
                    <p class="text-gray-600 mb-4">对象状态变化自动通知依赖对象。</p>
                    <div class="highlight-box bg-pink-50">
                        <h4 class="font-semibold mb-2 text-pink-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.util.Observer/Observable</code></li>
                            <li><code class="bg-gray-100 px-1 rounded">PropertyChangeListener</code></li>
                        </ul>
                    </div>
                </div>

                <!-- 9. Strategy -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-orange-100 text-orange-600 mx-auto">
                        <i class="fas fa-chess-knight text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">策略模式</h3>
                    <p class="text-gray-600 mb-4">定义一系列算法，使它们可以互换。</p>
                    <div class="highlight-box bg-orange-50">
                        <h4 class="font-semibold mb-2 text-orange-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.util.Comparator</code></li>
                            <li><code class="bg-gray-100 px-1 rounded">java.util.function.Function</code></li>
                        </ul>
                    </div>
                </div>

                <!-- 10. Template Method -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-cyan-100 text-cyan-600 mx-auto">
                        <i class="fas fa-project-diagram text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">模板方法</h3>
                    <p class="text-gray-600 mb-4">定义算法骨架，将步骤延迟到子类。</p>
                    <div class="highlight-box bg-cyan-50">
                        <h4 class="font-semibold mb-2 text-cyan-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.util.AbstractList</code></li>
                            <li><code class="bg-gray-100 px-1 rounded">java.util.AbstractMap</code></li>
                        </ul>
                    </div>
                </div>

                <!-- 11. Adapter -->
                <div class="pattern-card bg-white p-6">
                    <div class="pattern-icon bg-gray-100 text-gray-600 mx-auto">
                        <i class="fas fa-exchange-alt text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-center text-gray-800">适配器模式</h3>
                    <p class="text-gray-600 mb-4">将一个接口转换成客户端期望的另一个接口。</p>
                    <div class="highlight-box bg-gray-50">
                        <h4 class="font-semibold mb-2 text-gray-700">JDK实例</h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li><code class="bg-gray-100 px-1 rounded">java.util.Arrays</code></li>
                            <li><code class="bg-gray-100 px-1 rounded">java.util.Properties</code></li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Summary -->
        <section class="bg-gradient-to-r from-blue-50 to-purple-50 rounded-2xl p-8 md:p-12 mb-20">
            <h2 class="text-3xl font-bold mb-6 text-gray-800">设计模式的价值</h2>
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <h3 class="text-xl font-semibold mb-4 text-blue-700 flex items-center">
                        <i class="fas fa-lightbulb mr-3"></i>
                        为什么JDK要使用设计模式?
                    </h3>
                    <ul class="space-y-3 text-gray-700">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>提高代码的可维护性和可扩展性</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>降低模块间的耦合度</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>增强代码的灵活性和复用性</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>提供标准化的解决方案</span>
                        </li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-xl font-semibold mb-4 text-purple-700 flex items-center">
                        <i class="fas fa-book-reader mr-3"></i>
                        如何学习JDK中的设计模式?
                    </h3>
                    <ul class="space-y-3 text-gray-700">
                        <li class="flex items-start">
                            <i class="fas fa-search text-blue-500 mt-1 mr-2"></i>
                            <span>阅读JDK源码，分析设计模式的应用</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-pencil-alt text-blue-500 mt-1 mr-2"></i>
                            <span>尝试在自己的项目中应用这些模式</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-project-diagram text-blue-500 mt-1 mr-2"></i>
                            <span>比较不同模式之间的区别与联系</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-comments text-blue-500 mt-1 mr-2"></i>
                            <span>与他人讨论设计模式的优缺点</span>
                        </li>
                    </ul>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12">
        <div class="container mx-auto px-4 text-center">
            <div class="mb-4">
                <h3 class="text-xl font-semibold text-white mb-2">技术小馆</h3>
                <a href="http://www.yuque.com/jtostring" class="text-blue-400 hover:text-blue-300 transition-colors duration-300">
                    www.yuque.com/jtostring
                </a>
            </div>
            <div class="flex justify-center space-x-6">
                <a href="#" class="text-gray-400 hover:text-white transition-colors duration-300">
                    <i class="fab fa-github text-xl"></i>
                </a>
                <a href="#" class="text-gray-400 hover:text-white transition-colors duration-300">
                    <i class="fab fa-twitter text-xl"></i>
                </a>
                <a href="#" class="text-gray-400 hover:text-white transition-colors duration-300">
                    <i class="fab fa-linkedin text-xl"></i>
                </a>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```